package Book;

public class BookList {
    private Book[] books=new Book[10];//注意写上数组的名字

    private int usedSize;//当前存放的书的数目

    public BookList(){
        books[0]=new Book ("c语言","小王",30,"计算机");
        books[1]=new Book ("java","小刘",70,"编程语言");
        books[2]=new Book ("python","小黄",90,"深度学习");

        usedSize=3;
    }

    public Book getBooks(int pos) {
        return books[pos];
    }

    public void setBook(int pos,Book book){
        books[pos]=book;
    }

    public int getUsedSize () {
        return usedSize;
    }

    public void setUsedSize (int usedSize) {
        this.usedSize = usedSize;
    }


}
